package com.matrix.java.chap_05;

import java.util.Scanner;

/*
    处理字符串
 */
public class Ex5_48 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("Enter a string: ");
        String str = input.nextLine();
        String strOutput = "";
        for (int i = 0; i < str.length(); i++) {
            if (i % 2 == 0) {
                strOutput += str.substring(i, i + 1);
            }
        }
        System.out.println(strOutput);
        input.close();
    }
}
